package com.serviceprovider.business.module.sp.transaction.services.dao.impl;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.sp.transaction.model.Batch;

import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

//~--- JDK imports ------------------------------------------------------------

import java.sql.ResultSet;
import java.sql.SQLException;

public class BatchMapper implements ParameterizedRowMapper<Batch> {
    @Override
    public Batch mapRow(ResultSet rs, int arg1) throws SQLException {
        Batch batch = new Batch();

        batch.setBatchDate(rs.getDate("batch_date"));
        batch.setCustomLabelName1(rs.getString("custom_label_1_name"));
        batch.setCustomLabelName2(rs.getString("custom_label_2_name"));
        batch.setId(rs.getInt("batch_id"));
        batch.setOrderId(rs.getInt("order_id"));

        return batch;
    }
}



